import 'dart:async';

import 'package:flutter/services.dart';

class MyPlugin {
  static const MethodChannel _channel = const MethodChannel('MyPlugin');

  static Future<String> get platformVersion async {
    final String version = await _channel.invokeMethod('getPlatformVersion');
    return version;
  }

//新增一个方法 用于发送字典即Map参数给iOS平台 返回值是泛型类型用于接收iOS发送过来的消息内容
  static Future<dynamic> dartSendMessageToIOS(Map<String, dynamic> args) {
    return _channel.invokeMethod("dartSendMessageToIOS", args);
  }
}